<template>
  <div class="weekend-wrapper">
    <div class="weekend-title">
      周末去哪儿
    </div>

    <ul class="list">
      <router-link 
        to ="/detail" 
        class="list-item" 
        tag ="li"
        v-for="item in weekendList"  
        :key="item.id">

        <div class="item-img">
          <img :src="item.imgUrl" />
        </div>
        <div class="item-info">      
            <div class="title">{{item.title}}</div>
            <div class="comment">{{item.comment}}</div>
        </div>
      </router-link>
    </ul>
    <div class="show-products">
     <router-link to="">查看所有产品</router-link>
    </div>
  </div>
</template>

<script>
export default {
  name: "HomeWeekend",
  props: {
    weekendList: Array
  },
  data() {
    return {
    
    }
  }
};
</script>

<style lang="stylus" scoped>
@import '~styles/variables.styl';
@import '~styles/mixins.styl';

.weekend-wrapper{
  margin-top: .2rem;
  background-color #fff;
}

.weekend-title {
  width: 100%;
  height: 0.8rem;
  line-height: 0.8rem;
  font-size: 0.32rem;
  background-color: #fff;
  padding: 0 0.2rem;
  border-bottom: 1px solid #eee;
}

.list-item {
  padding-top: .1rem;
  width: 100%;
}

.list-item .item-img{
  height: 2.8rem;
}

.list-item .item-img img{
  width: 100%;
  height: 100%;
}

.list-item .item-info {
  width:100%;
  height: .88rem;
  padding: .2rem;
  padding-top: .14rem;
}

.list-item .item-info .title {
  color: $darkTextColor;
  font-size: .28rem;
  line-height: .48rem;
  padding-right: 1.4rem;
  ellipsis();
}

.list-item .item-info  .comment {
  padding-right: 1.4rem;
  font-size: .24rem;
  line-height: .42rem;
  ellipsis();
}

.show-products{
  padding: .2rem 0;
  border-top: 1px solid #eee;
  text-align: center;
  color: $lightTxtBlue;
}

</style>
